﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace JZK.SprayProcessSCADASystem
{
    public partial class FrmMain : UIHeaderAsideMainFooterFrame
    {
        public FrmMain()
        {
            InitializeComponent();
            //设置关联
            Aside.TabControl = MainTabControl;
            //设置初始页面索引（关联页面，唯一不重复即可）
            int pageIndex = 1000;

            TreeNode parent = Aside.CreateNode("监控模块", 61451, 24, pageIndex);

            Aside.CreateChildNode(parent, AddPage(new PageEquipmentMonitor(), ++pageIndex));
            Aside.CreateChildNode(parent, AddPage(new PageEquipmentMonitor1(), ++pageIndex));
            Aside.CreateChildNode(parent, AddPage(new PageEquipmentMonitor2(), ++pageIndex));

            TreeNode parent1 = Aside.CreateNode("总控模块", 61451, 24, pageIndex);
            Aside.CreateChildNode(parent1, AddPage(new PageTotalEquipmentControl(), ++pageIndex));

            //增加页面到Main
            //AddPage(new PageEquipmentMonitor(), 1001);
            //AddPage(new PageEquipmentMonitor1(), 1002);
            //AddPage(new PageEquipmentMonitor(), 1003);

            ////设置Header节点索引
            //Aside.CreateNode("Page1", 1001);
            //Aside.CreateNode("Page2", 1002);
            //Aside.CreateNode("Page3", 1003);

            //显示默认界面
            Aside.SelectFirst();
        }


        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void Header_MenuItemClick(string itemText, int menuIndex, int pageIndex)
        {

        }

        private void Aside_MenuItemClick(TreeNode node, NavMenuItem item, int pageIndex)
        {

        }

        private void uiLabel4_Click(object sender, EventArgs e)
        {

        }
    }
}
